package base.config;

import utils.PropertiesReader;

import java.util.Properties;
import java.util.UUID;

public class KafkaProperty {

    private static String kafkaServers = PropertiesReader.get("default.kafka.servers");

    public static Properties getDefaultProperty() {
        String randomId = UUID.randomUUID().toString().replace("-", "");
        return getDefaultProperty(randomId);
    }

    public static Properties getDefaultProperty(String groupId) {
        Properties props = new Properties();
        props.setProperty("bootstrap.servers", kafkaServers);
        props.setProperty("group.id", groupId);
        return props;
    }
}
